/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dieci.hibernate;

import dieci.database.PersistentObject;
import dieci.system.ReturnDetails;

/**
 *
 * @author Blanco
 */
public class HibReturnDetails implements PersistentObject{

    private HibReturnDetailId id;
    private int amount;

    public HibReturnDetails()
    {
    }

    public HibReturnDetails(ReturnDetails details, Long returnId)
    {
        id = new HibReturnDetailId();
        id.setReturnId(returnId);
        id.setProductId(details.getProductId());
        this.amount = details.getAmount();
    }

  
    /**
     * Get the value of amount
     *
     * @return the value of amount
     */
    public int getAmount()
    {
        return amount;
    }

    /**
     * Set the value of amount
     *
     * @param amount new value of amount
     */
    public void setAmount(int amount)
    {
        this.amount = amount;
    }

    /**
     * Get the value of details
     *
     * @return the value of details
     */
    public HibReturnDetailId getId()
    {
        return id;
    }

    /**
     * Set the value of details
     *
     * @param details new value of details
     */
    public void setId(HibReturnDetailId id)
    {
        this.id = id;
    }
    
}
